package com.suse.common.util.stream;

import java.util.List;
import java.util.function.Consumer;

/**
 * <p>
 * 数据流
 * </p>
 *
 * @author 辜玉彬
 * @since 2022-08-23 14:51
 */
public class DataStream<T> {

    private final List<T> list;

    public DataStream(List<T> list) {
        this.list = list;
    }

    public void forEach(Consumer<T> action) {
        for (T t : list) {
            action.accept(t);
        }
    }
    
}
